package com.lyx.server.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * ⽤户⽇志表
 * @TableName t_user_log
 */
@TableName(value ="t_user_log")
@NoArgsConstructor
@Data
public class UserLog implements Serializable {
    /**
     * 序号，主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * ⽤户id
     */
    @TableField(value = "uid")
    private Integer uid;

    /**
     * 类型
     */
    @TableField(value = "type")
    private String type;

    /**
     * 标题
     */
    @TableField(value = "title")
    private String title;

    /**
     * 内容
     */
    @TableField(value = "info")
    private String info;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public UserLog(Integer uid, String type, String title, String info) {
        this.uid = uid;
        this.type = type;
        this.title = title;
        this.info = info;
        this.createTime = new Date();
    }
}
